<?php
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "vote";

$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);

if(!$conn)
{
die('connect error:'.mysql_error());
}

mysql_select_db('vote',$conn) or die("database connect error: ".mysql_error());

mysql_query("SET NAMES utf8");

?>